package com.ss.android.newmedia.message.dialog;

import android.content.Context;
import android.text.TextUtils;
import com.bytedance.common.utility.Logger;
import org.json.JSONException;
import org.json.JSONObject;

public final class w {
    public String a;
    public boolean b;
    public boolean c;
    private static w d;

    private w(Context arg2) {

        this.a = "";
        this.b = true;
        this.c = false;
        arg2.getApplicationContext();
    }

    public static w a(Context arg2) {
        w v0_1;
        Class v1 = w.class;
        synchronized (v1){
            if(w.d == null) {
                w.d = new w(arg2);
            }

            v0_1 = w.d;
        }
        return v0_1;
    }

    public final void a() {
        boolean v2;
        boolean v0 = true;
        if(!TextUtils.isEmpty(this.a)) {
            Logger.d("PushDialogConfig", "mPushAlertDialogSetting = " + this.a);
            try {
                JSONObject v3 = new JSONObject(this.a);
                v3.optInt("normal_dialog_auto_dismiss_time", 6000);
                if(v3.optInt("is_show_normal_push_pop_dialog", 0) > 0) {
                    v2 = true;
                } else {
                    v2 = false;
                }

                this.b = v2;
                if(v3.optInt("is_show_old_push_dialog", 0) <= 0) {
                    v0 = false;
                }
                this.c = v0;
            }
            catch(JSONException v0_1) {
                v0_1.printStackTrace();
            }
        }
    }
}

